<?php

namespace App\Http\Controllers\Admin\Ca;

use App\Http\Controllers\Admin\BaseController;
use App\Repositories\Ca\CustomerRepository;
use Illuminate\Http\Request;

class PublicController extends BaseController
{
    public function __construct()
    {
        $this->set('ca/public');
    }

    function index()
    {
        return $this->view('index');
    }

    function pager(CustomerRepository $rep, Request $request)
    {
        $params = $request->all();
        $params['is_public'] = true;
        return $rep->publicPager($params);
    }

    function receive(CustomerRepository $rep, Request $request)
    {
        return $rep->receive($request->get('id', 0));
    }

}